package com.zhengx.androidarchbasicsample

import android.content.res.Configuration
import com.zhengx.baselib.base.BaseApplication
import com.zhengx.baselib.ModulesInitializer

/**
 * name：$pakage$
 * class: describe
 * author: zhengx
 * create_time: $date$
 */
class MyApp : BaseApplication(){

    private val MODULESLIST = arrayOf("com.zhengx.moduletest.ModuleApplicationFake")

    private val modulesInitializer : ModulesInitializer = ModulesInitializer(MODULESLIST, this)

    override fun onCreate() {
        super.onCreate()
        modulesInitializer.onCreate()
    }

    override fun onTerminate() {
        super.onTerminate()
        modulesInitializer.onTerminate()

    }

    override fun onConfigurationChanged(newConfig: Configuration?) {
        super.onConfigurationChanged(newConfig)
        modulesInitializer.onConfigurationChanged(newConfig)

    }

    override fun onLowMemory() {
        super.onLowMemory()
        modulesInitializer.onLowMemory()
    }

    override fun onTrimMemory(level: Int) {
        super.onTrimMemory(level)
        modulesInitializer.onTrimMemory(level)
    }
}